Imports System.Xml.Serialization
Imports EdmxEditor.CodeGeneration

Namespace CSDL

    Public Class EntityContainerEntitySet
        Inherits XEntityModelElementWithDocumentationBase

        ''' <summary>Initializes an instance of the <see cref="EntityContainerEntitySet" /> class.
        ''' This is the default constructor for this class.</summary>
        Public Sub New()
            MyBase.New("EntitySet", EdmXmlNamespace)
        End Sub

        ''' <summary>Initializes an instance of the <see cref="EntityContainerEntitySet" /> class.</summary>
        ''' <param name="other">An <see cref="System.Xml.Linq.XElement"/> object to copy from.</param>
        Public Sub New(ByVal other As XElement)
            MyBase.New(other)
        End Sub

        <XmlAttribute()> _
        Public Shadows Property Name() As String
            Get
                Return Me.@Name
            End Get
            Set(ByVal value As String)
                Me.@Name = value
            End Set
        End Property

        <XmlAttribute()> _
        Public Property EntityType() As String
            Get
                Return Me.@EntityType
            End Get
            Set(ByVal value As String)
                Me.@EntityType = value
            End Set
        End Property

        <XmlAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Qualified, [Namespace]:=CodeGenerationXmlNamespace)> _
        Public Property GetterAccess() As Access
            Get
                Return GetEnumValueAttribute(GetType(Access), Me.Attribute(XName.Get("GetterAccess", CodeGenerationXmlNamespace)))
            End Get
            Set(ByVal value As Access)
                If (Me.Attribute(XName.Get("GetterAccess", CodeGenerationXmlNamespace)) Is Nothing) Then
                    Me.Add(New XAttribute(XName.Get("GetterAccess", CodeGenerationXmlNamespace), ""))
                End If
                SetEnumValueAttribute(GetType(Access), Me.Attribute(XName.Get("GetterAccess", CodeGenerationXmlNamespace)), value)
            End Set
        End Property

    End Class

End Namespace